package com.wayne.oauth2.service;

import com.wayne.oauth2.entity.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;

@Service
public class OrderService {
    @Autowired
    private ProductService productService;

    public Order selectOrderById(Integer id) {
        return new Order(1, "order-001", "中国", 20d, Arrays.asList(productService.selectProductById(1)));
    }
}
